package kitrobot.com.bed.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.MalformedJsonException;
import android.view.View;
import android.view.WindowManager;
import android.widget.Toast;

import kitrobot.com.wechat_bottom_navigation.R;

public class MajorActivity extends AppCompatActivity implements View.OnClickListener {
    private String phone=null;
    private String id=null;
    private String name=null;
    private String token=null;
    private String type=null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main);
        Intent intent=getIntent();
        phone=intent.getStringExtra("phone");
        name=intent.getStringExtra("name");
        id=intent.getStringExtra("id");
        token=intent.getStringExtra("token");
        type=intent.getStringExtra("type");

        System.out.println("手机号="+phone);
    }
    public void Nextto1(View view){
        Intent intent=new Intent(this,MainActivity.class);
        intent.putExtra("flag",1);
        intent.putExtra("token",token);
        intent.putExtra("id",id);
        intent.putExtra("name",name);
        intent.putExtra("phone",phone);
        intent.putExtra("type",type);
        startActivity(intent);
    }
    public void Nextto2(View view){
        Intent intent=new Intent(this,MainActivity.class);
        intent.putExtra("flag",2);
        intent.putExtra("token",token);
        intent.putExtra("id",id);
        intent.putExtra("name",name);
        intent.putExtra("phone",phone);
        intent.putExtra("type",type);
        startActivity(intent);
    }
    public void Nextto3(View view){
        Intent intent=new Intent(this,MainActivity.class);
        intent.putExtra("flag",3);
        intent.putExtra("token",token);
        intent.putExtra("id",id);
        intent.putExtra("name",name);
        intent.putExtra("phone",phone);
        intent.putExtra("type",type);
        startActivity(intent);
    }
    public void Nextto5(View view){
        Intent intent=new Intent(this,MainActivity.class);
        intent.putExtra("flag",4);
        intent.putExtra("token",token);
        intent.putExtra("id",id);
        intent.putExtra("name",name);
        intent.putExtra("phone",phone);
        intent.putExtra("type",type);
        startActivity(intent);
    }
    public void Finish(View view) {
        finish();
    }

    @Override
    public void onClick(View view) {

    }

}
